//
//  AY_BookChaseCell.m
//  AiYue
//
//  Created by boWen on 2023/11/2.
//

#import "AY_BookChaseCell.h"


@implementation AY_BookChaseCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createSubView];
    }
    return self;
}
- (void)createSubView{
    
    self.iconImgView = [AYTool createImageViewWithFrame:CGRectZero andImage:nil andBg:[UIColor whiteColor]  andRadius:0.0 andAddSubView:self.contentView];
    [self.iconImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(YNUM(12));
        make.centerY.equalTo(self.contentView);
        make.height.width.mas_offset(YNUM(34));
    }];
    
    self.titleLabel = [AYTool createLabelWithFrame:CGRectZero andText:nil andTextColor:COLOR(@"#000002") andBgColor:nil andFont:[UIFont boldSystemFontOfSize:YNUM(14)] andLines:1 andRadius:0 andAddSubView:self.contentView];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.iconImgView.mas_right).offset(YNUM(15));
        make.centerY.equalTo(self.contentView);
        make.height.mas_offset(YNUM(16));
    }];
    
    self.infoLabel = [AYTool createLabelWithFrame:CGRectZero andText:nil andTextColor:[UIColor whiteColor] andBgColor:THEME_COLOR andFont:YFont(12) andLines:1 andRadius:YNUM(4) andAddSubView:self.contentView];
    [self.infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.titleLabel.mas_right).offset(YNUM(15));
        make.centerY.equalTo(self.titleLabel);
        make.height.mas_equalTo(YNUM(25));
    }];
    
//    UIView *line = [AYTool createViewWithFrame:CGRectZero andBg:COLOR(@"#EFEFEF") andRadius:YNUM(6) andAddSubView:self.contentView];
//    [line mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(self.contentView).offset(YNUM(61));
//        make.left.equalTo(self.contentView).offset(YNUM(12));
//        make.right.equalTo(self.contentView).offset(YNUM(-12));
//        make.height.mas_offset(YNUM(1));
//    }];
    
 
    self.stateView = [AYTool createImageViewWithFrame:CGRectZero andImage:nil andBg:[UIColor whiteColor] andRadius:0.0 andAddSubView:self.contentView];
    [self.stateView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(YNUM(-15));
        make.centerY.equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake(YNUM(16), YNUM(12)));
    }];
    
}

@end
